package com.zust.zst.common.dto.chooselesson;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 增加课程信息的实体
 *
 * @author Gavin Zhang
 * @date 2022/12/8 16:38
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class AddCultivationPlanDTO {

    @NotBlank(message = "学院不能为空")
    private String college;

    @NotNull(message = "年级不能为空")
    @Range(min = 1980, max = 2050, message = "年级范围应为：[1980, 20]50")
    private Integer grade;

    @NotBlank(message = "专业不能为空")
    private String major;

    @NotBlank(message = "课程名不能为空")
    private String courseName;

    @NotBlank(message = "课程代码不能为空")
    private String courseIndex;

    @NotNull(message = "学期不能为空")
    @Range(min = 1, max = 20, message = "学期应为：[1, 20]")
    private Integer term;

    @NotNull
    @Range(min = 0, max = 4, message = "课程状态码范围[0, 4]")
    private Integer status;

    @NotNull
    @Range(min = 0, max = 40, message = "学分范围[0, 40]")
    private BigDecimal point;

    @NotNull
    @Range(min = 0, max = 640, message = "总课时范围：[0, 640]")
    private Integer allPeriodTime;

    @NotNull
    @Range(min = 0, max = 40, message = "周课时范围：[0, 40]")
    private Integer weekTime;

}
